import request from '@/utils/request'

export const listCheckItem = (search) =>
    request({
        url: '/tCheckItem',
        method: 'get',
        params: {
            name: search.name,
            offset: search.offset,
            limit: search.limit
        }
    })

export const getCheckItemById = (id) =>
    request({
        url: '/tCheckItem/' + id,
        method: 'get'
    })

export const updateCheckItem = (checkItem) =>
    request({
        url: '/tCheckItem',
        method: 'put',
        data: checkItem
    })

export const saveCheckItem = (checkItem) =>
    request({
        url: '/tCheckItem',
        method: 'post',
        data: checkItem
    })